
#pragma once
#include "graphics/Texture.h"

// abstract class to represent a node in our scene graph
// handles reference counting

class CSgObject
{
public:
	CSgObject(void) { m_refs = 0; }
	virtual ~CSgObject(void) { }

	virtual void Render() = 0;

	void IncRef(void) { m_refs++; }
	void DecRef(void) { m_refs--; if (m_refs == 0) { delete this; } }
	void SetTexture( CTexture tex ) { m_Texture = tex; }

private:
	int m_refs;

protected:
	CTexture m_Texture;
};
